<template>
  <div v-loading="isLoading" class="honourJbs">
    <div
      v-for="(item, index) in List"
      :key="index"
      class="honour"
    >
      <el-image
        style="width: 100px; height: 100px"
        :src="item.img"
        :preview-src-list="srcList"
      />
      <p>{{ item.title }}</p>
    </div>

  </div>
</template>

<script>
import { getHonourJbs } from '@/api/login'
export default {
  name: 'HonourJbs',
  data() {
    return {
      isLoading: true,
      disabled: false,
      loadTit: '加载中...',
      List: [],
      // 查询参数
      queryParams: {
        pageNo: 1
      },
      srcList: []
    }
  },
  watch: {
    List: {
      handler(val) {
        val.forEach(item => {
          this.srcList.push(item.href)
        })
      },
      deep: true
    }
  },
  mounted() {
    this.getList()
  },
  methods: {
    getList() {
      getHonourJbs(this.queryParams).then(response => {
        this.List = response.data.list
        this.isLoading = false
      })
    }
  }
}
</script>
